<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="com.xteam.ecsystem.utils.AppConfig"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<jsp:include page="../../include/base.jsp"></jsp:include>
		<jsp:include page="../../include/common.jsp"></jsp:include>
		<link type="text/css" rel="stylesheet" href="../../resource/css/webmgr/webmgr.css"/>
		<style type="text/css">
			html{overflow: hidden;}
			.advFormTab{width:100%;font-size:12px;padding-top:14px;}
			.bottomDiv{width:100%; height:60px; text-align: center;line-height:60px;}
		</style>
	</head>
	
	<body>
		<form id="editAdvCfgForm" style="width:100%;height:100%;">
			<div class="mini-fit" >
				<div id="advConfigTab" class="mini-tabs" style="width:100%;height:100%;">
					<div title="基本设置">
						<table class="advFormTab" align="left" cellpadding="3">
							<tr>
								<td align="right" width="80">内容类型：</td>
								<td>
									<input id="sacType" name="sacType" class="mini-combobox" valueField="value" 
										textField="text" required="true" width="220px" onvaluechanged="onSacTypeValueChanged"/>
								</td>
								<td align="right">系统内容：</td>
								<td>
									<input id="sacContent" name="sacContent" class="mini-treeselect" 
										valueField="value" textField="text" parentField="parent" required="true" width="220px"/>
									<img id="find" title="查找" style="vertical-align: middle; cursor: pointer; display: none;"/>
								</td>
							</tr>
							<tr>
								<td align="right">广告名称：</td>
								<td><input id="sacName" name="sacName" class="mini-textbox" required="true" width="220px"/></td>
								<td align="right">显示排序：</td>
								<td><input id="sacOrder" name="sacOrder" class="mini-textbox" required="true" vtype="int" width="220px"/></td>
							</tr>
							<tr>
								<td align="right">显示页面：</td>
								<td>
									<input id="sacPage" name="sacPage" class="mini-combobox" 
										valueField="value" textField="text" required="true" width="220px"/>
								</td>
								<td align="right">显示位置：</td>
								<td>
									<input id="sacPosition" name="sacPosition" class="mini-combobox" 
										valueField="value" textField="text" required="true" width="220px"/>
								</td>
							</tr>
							<tr>
								<td align="right">链接地址：</td>
								<td><input id="sacUrl" name="sacUrl" class="mini-textbox" width="220px"/></td>
								<td align="right">调用函数：</td>
								<td><input id="sacFunction" name="sacFunction" class="mini-textbox" width="220px"/></td>
							</tr>
							<tr>
								<td align="right">配置状态：</td>
								<td colspan="3">
									<input id="sacState" name="sacState" class="mini-combobox" 
										valueField="value" textField="text" width="220px"/>
								</td>
							</tr>
						</table>
					</div>
					<div title="广告介绍">
						<table class="advFormTab" align="left" cellpadding="3">
							<tr><td align="center">
								<input id="sacIntro" name="sacIntro" class="mini-textarea" width="644px" height="310px"/>
							</td></tr>
						</table>
					</div>
					<div title="广告图片">
						<table class="advFormTab" align="left" cellpadding="3">
							<tr>
								<td align="right" width="80">图片选择：</td>
								<td colspan="3">
									<input id="image" class="mini-fileupload" width="460" uploadOnSelect="true" 
										onuploadsuccess="onImageUploadSuccess" onuploaderror="onImageUploadError"/>
									<input id="remove" class="mini-button" text="删除图片" iconCls="icon-remove" 
										height="19px" onclick="onRemoveClick"/>
								</td>
							</tr>
							<tr>
								<td align="right">图片预览：</td>
								<td colspan="3">
									<div id="viewer" style="border: 1px dashed #9DA0AA; width: 545px; height: 280px;"></div>
								</td>
							</tr>
						</table>
					</div>
				</div>
			</div>
			<div class="bottomDiv">
				<input id="save" class="mini-button" text="保存" iconCls="icon-save" plain="false" 
   					onclick="onSaveClick"/>&nbsp;&nbsp;
   				<input id="cancel" class="mini-button" text="关闭" iconCls="icon-cancel" plain="false" 
   					onclick="onCancelClick"/>
			</div>
		</form>
	</body>
	<script type="text/javascript" language="javascript"> var __path = "<%=AppConfig.getAdvertiseImagePath() %>"; </script>
	<script type="text/javascript" language="javascript" src="config/WebMgrConfig.js"></script>
	<script type="text/javascript" language="javascript" src="handler/EditAdvCfgHandler.js"></script>
</html>
